3.1.10 \(\int \frac {(e+f x) (A+B x+C x^2)}{\sqrt {1-d x} \sqrt {1+d x}} \, dx\) [10]

3.1.10.1 Optimal result
3.1.10.2 Mathematica [A] (verified)
3.1.10.3 Rubi [A] (verified)
3.1.10.4 Maple [A] (verified)
3.1.10.5 Fricas [A] (verification not implemented)
3.1.10.6 Sympy [F(-1)]
3.1.10.7 Maxima [A] (verification not implemented)
3.1.10.8 Giac [A] (verification not implemented)
3.1.10.9 Mupad [B] (verification not implemented)

3.1.10.1 Optimal result

Integrand size = 35, antiderivative size = 130 \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {C (e+f x)^2 \sqrt {1-d^2 x^2}}{3 d^2 f}-\frac {\left (2 \left (3 d^2 f (B e+A f)-C \left (d^2 e^2-2 f^2\right )\right )-d^2 f (C e-3 B f) x\right ) \sqrt {1-d^2 x^2}}{6 d^4 f}+\frac {\left (C e+2 A d^2 e+B f\right ) \arcsin (d x)}{2 d^3} \]

output
1/2*(2*A*d^2*e+B*f+C*e)*arcsin(d*x)/d^3-1/3*C*(f*x+e)^2*(-d^2*x^2+1)^(1/2) 
/d^2/f-1/6*(6*d^2*f*(A*f+B*e)-2*C*(d^2*e^2-2*f^2)-d^2*f*(-3*B*f+C*e)*x)*(- 
d^2*x^2+1)^(1/2)/d^4/f
 
3.1.10.2 Mathematica [A] (verified)

Time = 0.46 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.82 \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {\sqrt {1-d^2 x^2} \left (-6 B d^2 e-4 C f-6 A d^2 f-3 C d^2 e x-3 B d^2 f x-2 C d^2 f x^2\right )}{6 d^4}+\frac {\left (C e+2 A d^2 e+B f\right ) \arctan \left (\frac {d x}{-1+\sqrt {1-d^2 x^2}}\right )}{d^3} \]

input
Integrate[((e + f*x)*(A + B*x + C*x^2))/(Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
 
output
(Sqrt[1 - d^2*x^2]*(-6*B*d^2*e - 4*C*f - 6*A*d^2*f - 3*C*d^2*e*x - 3*B*d^2 
*f*x - 2*C*d^2*f*x^2))/(6*d^4) + ((C*e + 2*A*d^2*e + B*f)*ArcTan[(d*x)/(-1 
 + Sqrt[1 - d^2*x^2])])/d^3
 
3.1.10.3 Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.08, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {2112, 2185, 25, 27, 676, 223}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {d x+1}} \, dx\)

\(\Big \downarrow \) 2112

\(\displaystyle \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d^2 x^2}}dx\)

\(\Big \downarrow \) 2185

\(\displaystyle -\frac {\int -\frac {f (e+f x) \left (\left (3 A d^2+2 C\right ) f-d^2 (C e-3 B f) x\right )}{\sqrt {1-d^2 x^2}}dx}{3 d^2 f^2}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^2}{3 d^2 f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {f (e+f x) \left (\left (3 A d^2+2 C\right ) f-d^2 (C e-3 B f) x\right )}{\sqrt {1-d^2 x^2}}dx}{3 d^2 f^2}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^2}{3 d^2 f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {(e+f x) \left (\left (3 A d^2+2 C\right ) f-d^2 (C e-3 B f) x\right )}{\sqrt {1-d^2 x^2}}dx}{3 d^2 f}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^2}{3 d^2 f}\)

\(\Big \downarrow \) 676

\(\displaystyle \frac {\frac {3}{2} f \left (2 A d^2 e+B f+C e\right ) \int \frac {1}{\sqrt {1-d^2 x^2}}dx-\sqrt {1-d^2 x^2} \left (3 f (A f+B e)-C \left (e^2-\frac {2 f^2}{d^2}\right )\right )+\frac {1}{2} f x \sqrt {1-d^2 x^2} (C e-3 B f)}{3 d^2 f}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^2}{3 d^2 f}\)

\(\Big \downarrow \) 223

\(\displaystyle \frac {\frac {3 f \arcsin (d x) \left (2 A d^2 e+B f+C e\right )}{2 d}-\sqrt {1-d^2 x^2} \left (3 f (A f+B e)-C \left (e^2-\frac {2 f^2}{d^2}\right )\right )+\frac {1}{2} f x \sqrt {1-d^2 x^2} (C e-3 B f)}{3 d^2 f}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^2}{3 d^2 f}\)

input
Int[((e + f*x)*(A + B*x + C*x^2))/(Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]
 
output
-1/3*(C*(e + f*x)^2*Sqrt[1 - d^2*x^2])/(d^2*f) + (-((3*f*(B*e + A*f) - C*( 
e^2 - (2*f^2)/d^2))*Sqrt[1 - d^2*x^2]) + (f*(C*e - 3*B*f)*x*Sqrt[1 - d^2*x 
^2])/2 + (3*f*(C*e + 2*A*d^2*e + B*f)*ArcSin[d*x])/(2*d))/(3*d^2*f)
 

3.1.10.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 223
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt 
[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && NegQ[b]
 

rule 676
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x 
_Symbol] :> Simp[(e*f + d*g)*((a + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + (Sim 
p[e*g*x*((a + c*x^2)^(p + 1)/(c*(2*p + 3))), x] - Simp[(a*e*g - c*d*f*(2*p 
+ 3))/(c*(2*p + 3))   Int[(a + c*x^2)^p, x], x]) /; FreeQ[{a, c, d, e, f, g 
, p}, x] &&  !LeQ[p, -1]
 

rule 2112
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f 
_.)*(x_))^(p_.), x_Symbol] :> Int[Px*(a*c + b*d*x^2)^m*(e + f*x)^p, x] /; F 
reeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a*d, 0] & 
& EqQ[m, n] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))
 

rule 2185
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : 
> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x) 
^(m + q - 1)*((a + b*x^2)^(p + 1)/(b*e^(q - 1)*(m + q + 2*p + 1))), x] + Si 
mp[1/(b*e^q*(m + q + 2*p + 1))   Int[(d + e*x)^m*(a + b*x^2)^p*ExpandToSum[ 
b*e^q*(m + q + 2*p + 1)*Pq - b*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x 
)^(q - 2)*(a*e^2*(m + q - 1) - b*d^2*(m + q + 2*p + 1) - 2*b*d*e*(m + q + p 
)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, d 
, e, m, p}, x] && PolyQ[Pq, x] && NeQ[b*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && 
True) &&  !(IGtQ[m, 0] && RationalQ[a, b, d, e] && (IntegerQ[p] || ILtQ[p + 
 1/2, 0]))
 
3.1.10.4 Maple [A] (verified)

Time = 1.66 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.33

method result size
risch \(\frac {\left (2 C \,d^{2} f \,x^{2}+3 B \,d^{2} f x +3 C \,d^{2} e x +6 A \,d^{2} f +6 B \,d^{2} e +4 f C \right ) \sqrt {d x +1}\, \left (d x -1\right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{6 d^{4} \sqrt {-\left (d x +1\right ) \left (d x -1\right )}\, \sqrt {-d x +1}}+\frac {\left (2 A \,d^{2} e +B f +C e \right ) \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+1}}\right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{2 d^{2} \sqrt {d^{2}}\, \sqrt {-d x +1}\, \sqrt {d x +1}}\) \(173\)
default \(-\frac {\sqrt {-d x +1}\, \sqrt {d x +1}\, \left (2 C \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d^{2} f \,x^{2}+3 B \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d^{2} f x +3 C \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d^{2} e x +6 A \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d^{2} f -6 A \arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) d^{3} e +6 B \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d^{2} e -3 B \arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) d f +4 C \sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) f -3 C \arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) d e \right ) \operatorname {csgn}\left (d \right )}{6 d^{4} \sqrt {-d^{2} x^{2}+1}}\) \(235\)

input
int((f*x+e)*(C*x^2+B*x+A)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVER 
BOSE)
 
output
1/6*(2*C*d^2*f*x^2+3*B*d^2*f*x+3*C*d^2*e*x+6*A*d^2*f+6*B*d^2*e+4*C*f)*(d*x 
+1)^(1/2)*(d*x-1)/d^4/(-(d*x+1)*(d*x-1))^(1/2)*((-d*x+1)*(d*x+1))^(1/2)/(- 
d*x+1)^(1/2)+1/2*(2*A*d^2*e+B*f+C*e)/d^2/(d^2)^(1/2)*arctan((d^2)^(1/2)*x/ 
(-d^2*x^2+1)^(1/2))*((-d*x+1)*(d*x+1))^(1/2)/(-d*x+1)^(1/2)/(d*x+1)^(1/2)
 
3.1.10.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.88 \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {{\left (2 \, C d^{2} f x^{2} + 6 \, B d^{2} e + 2 \, {\left (3 \, A d^{2} + 2 \, C\right )} f + 3 \, {\left (C d^{2} e + B d^{2} f\right )} x\right )} \sqrt {d x + 1} \sqrt {-d x + 1} + 6 \, {\left (B d f + {\left (2 \, A d^{3} + C d\right )} e\right )} \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right )}{6 \, d^{4}} \]

input
integrate((f*x+e)*(C*x^2+B*x+A)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm= 
"fricas")
 
output
-1/6*((2*C*d^2*f*x^2 + 6*B*d^2*e + 2*(3*A*d^2 + 2*C)*f + 3*(C*d^2*e + B*d^ 
2*f)*x)*sqrt(d*x + 1)*sqrt(-d*x + 1) + 6*(B*d*f + (2*A*d^3 + C*d)*e)*arcta 
n((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/(d*x)))/d^4
 
3.1.10.6 Sympy [F(-1)]

Timed out. \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=\text {Timed out} \]

input
integrate((f*x+e)*(C*x**2+B*x+A)/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)
 
output
Timed out
 
3.1.10.7 Maxima [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.01 \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {\sqrt {-d^{2} x^{2} + 1} C f x^{2}}{3 \, d^{2}} + \frac {A e \arcsin \left (d x\right )}{d} - \frac {\sqrt {-d^{2} x^{2} + 1} B e}{d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} A f}{d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} {\left (C e + B f\right )} x}{2 \, d^{2}} + \frac {{\left (C e + B f\right )} \arcsin \left (d x\right )}{2 \, d^{3}} - \frac {2 \, \sqrt {-d^{2} x^{2} + 1} C f}{3 \, d^{4}} \]

input
integrate((f*x+e)*(C*x^2+B*x+A)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm= 
"maxima")
 
output
-1/3*sqrt(-d^2*x^2 + 1)*C*f*x^2/d^2 + A*e*arcsin(d*x)/d - sqrt(-d^2*x^2 + 
1)*B*e/d^2 - sqrt(-d^2*x^2 + 1)*A*f/d^2 - 1/2*sqrt(-d^2*x^2 + 1)*(C*e + B* 
f)*x/d^2 + 1/2*(C*e + B*f)*arcsin(d*x)/d^3 - 2/3*sqrt(-d^2*x^2 + 1)*C*f/d^ 
4
 
3.1.10.8 Giac [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.86 \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=-\frac {{\left (6 \, B d^{2} e + 6 \, A d^{2} f - 3 \, C d e - 3 \, B d f + {\left (3 \, C d e + 2 \, {\left (d x + 1\right )} C f + 3 \, B d f - 4 \, C f\right )} {\left (d x + 1\right )} + 6 \, C f\right )} \sqrt {d x + 1} \sqrt {-d x + 1} - 6 \, {\left (2 \, A d^{3} e + C d e + B d f\right )} \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {d x + 1}\right )}{6 \, d^{4}} \]

input
integrate((f*x+e)*(C*x^2+B*x+A)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm= 
"giac")
 
output
-1/6*((6*B*d^2*e + 6*A*d^2*f - 3*C*d*e - 3*B*d*f + (3*C*d*e + 2*(d*x + 1)* 
C*f + 3*B*d*f - 4*C*f)*(d*x + 1) + 6*C*f)*sqrt(d*x + 1)*sqrt(-d*x + 1) - 6 
*(2*A*d^3*e + C*d*e + B*d*f)*arcsin(1/2*sqrt(2)*sqrt(d*x + 1)))/d^4
 
3.1.10.9 Mupad [B] (verification not implemented)

Time = 14.68 (sec) , antiderivative size = 492, normalized size of antiderivative = 3.78 \[ \int \frac {(e+f x) \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx=\frac {\frac {2\,B\,f\,\left (\sqrt {1-d\,x}-1\right )}{\sqrt {d\,x+1}-1}-\frac {14\,B\,f\,{\left (\sqrt {1-d\,x}-1\right )}^3}{{\left (\sqrt {d\,x+1}-1\right )}^3}+\frac {14\,B\,f\,{\left (\sqrt {1-d\,x}-1\right )}^5}{{\left (\sqrt {d\,x+1}-1\right )}^5}-\frac {2\,B\,f\,{\left (\sqrt {1-d\,x}-1\right )}^7}{{\left (\sqrt {d\,x+1}-1\right )}^7}}{d^3\,{\left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}+1\right )}^4}-\frac {\sqrt {1-d\,x}\,\left (\frac {2\,C\,f}{3\,d^4}+\frac {2\,C\,f\,x}{3\,d^3}+\frac {C\,f\,x^3}{3\,d}+\frac {C\,f\,x^2}{3\,d^2}\right )}{\sqrt {d\,x+1}}+\frac {\frac {2\,C\,e\,\left (\sqrt {1-d\,x}-1\right )}{\sqrt {d\,x+1}-1}-\frac {14\,C\,e\,{\left (\sqrt {1-d\,x}-1\right )}^3}{{\left (\sqrt {d\,x+1}-1\right )}^3}+\frac {14\,C\,e\,{\left (\sqrt {1-d\,x}-1\right )}^5}{{\left (\sqrt {d\,x+1}-1\right )}^5}-\frac {2\,C\,e\,{\left (\sqrt {1-d\,x}-1\right )}^7}{{\left (\sqrt {d\,x+1}-1\right )}^7}}{d^3\,{\left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}+1\right )}^4}-\frac {\left (\frac {A\,f}{d^2}+\frac {A\,f\,x}{d}\right )\,\sqrt {1-d\,x}}{\sqrt {d\,x+1}}-\frac {\left (\frac {B\,e}{d^2}+\frac {B\,e\,x}{d}\right )\,\sqrt {1-d\,x}}{\sqrt {d\,x+1}}-\frac {4\,A\,e\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {1-d\,x}-1\right )}{\left (\sqrt {d\,x+1}-1\right )\,\sqrt {d^2}}\right )}{\sqrt {d^2}}-\frac {2\,B\,f\,\mathrm {atan}\left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )}{d^3}-\frac {2\,C\,e\,\mathrm {atan}\left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )}{d^3} \]

input
int(((e + f*x)*(A + B*x + C*x^2))/((1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)
 
output
((2*B*f*((1 - d*x)^(1/2) - 1))/((d*x + 1)^(1/2) - 1) - (14*B*f*((1 - d*x)^ 
(1/2) - 1)^3)/((d*x + 1)^(1/2) - 1)^3 + (14*B*f*((1 - d*x)^(1/2) - 1)^5)/( 
(d*x + 1)^(1/2) - 1)^5 - (2*B*f*((1 - d*x)^(1/2) - 1)^7)/((d*x + 1)^(1/2) 
- 1)^7)/(d^3*(((1 - d*x)^(1/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 + 1)^4) - (( 
1 - d*x)^(1/2)*((2*C*f)/(3*d^4) + (2*C*f*x)/(3*d^3) + (C*f*x^3)/(3*d) + (C 
*f*x^2)/(3*d^2)))/(d*x + 1)^(1/2) + ((2*C*e*((1 - d*x)^(1/2) - 1))/((d*x + 
 1)^(1/2) - 1) - (14*C*e*((1 - d*x)^(1/2) - 1)^3)/((d*x + 1)^(1/2) - 1)^3 
+ (14*C*e*((1 - d*x)^(1/2) - 1)^5)/((d*x + 1)^(1/2) - 1)^5 - (2*C*e*((1 - 
d*x)^(1/2) - 1)^7)/((d*x + 1)^(1/2) - 1)^7)/(d^3*(((1 - d*x)^(1/2) - 1)^2/ 
((d*x + 1)^(1/2) - 1)^2 + 1)^4) - (((A*f)/d^2 + (A*f*x)/d)*(1 - d*x)^(1/2) 
)/(d*x + 1)^(1/2) - (((B*e)/d^2 + (B*e*x)/d)*(1 - d*x)^(1/2))/(d*x + 1)^(1 
/2) - (4*A*e*atan((d*((1 - d*x)^(1/2) - 1))/(((d*x + 1)^(1/2) - 1)*(d^2)^( 
1/2))))/(d^2)^(1/2) - (2*B*f*atan(((1 - d*x)^(1/2) - 1)/((d*x + 1)^(1/2) - 
 1)))/d^3 - (2*C*e*atan(((1 - d*x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1)))/d^3